package com.cruel_wandering.wifi_geo_predictor.wifi_simulation;

import java.util.List;

import android.net.DhcpInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;

public abstract class MyWifiManager
{
	abstract public int addNetwork(WifiConfiguration config);
	abstract public WifiManager.WifiLock createWifiLock(int lockType, String tag);
	abstract public WifiManager.WifiLock createWifiLock(String tag);
	abstract public boolean disableNetwork(int netId);
	abstract public boolean disconnect();
	abstract public boolean enableNetwork(int netId, boolean disableOthers);
	abstract public List<WifiConfiguration> getConfiguredNetworks();
	abstract public MyWifiInfo getConnectionInfo();
	abstract public DhcpInfo getDhcpInfo();
	abstract public List<MyScanResult> getScanResults();
	abstract public int getWifiState();
	abstract public boolean isWifiEnabled();
	abstract public boolean pingSupplicant();
	abstract public boolean reassociate();
	abstract public boolean reconnect();
	abstract public boolean removeNetwork(int netId);
	abstract public boolean saveConfiguration();
	abstract public boolean setWifiEnabled(boolean enabled);
	abstract public boolean startScan();
	abstract public int updateNetwork(WifiConfiguration config);

	static public int calculateSignalLevel(int rssi, int numLevels)
	{
		return WifiManager.calculateSignalLevel(rssi, numLevels);
	}

	static int compareSignalLevel(int rssiA, int rssiB)
	{
		return WifiManager.compareSignalLevel(rssiA, rssiB);
	}

	static MyWifiManager manager = null;

	static public void setManager(MyWifiManager manager)
	{
		MyWifiManager.manager = manager;
	}

	static public MyWifiManager getManager()
	{
		return manager;
	}
}